package cn.itcalvin.sncoal.cth.config;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class CthConfig implements InitializingBean {

    @Value("${cth.resetPwd}")
    private String resetPwd;

    @Value("${cth.minioUrl}")
    private String minioUrl;


    @Value("${cth.token.secret}")
    private String secret;
    @Value("${cth.token.expire}")
    private Integer expire;
    @Value("${cth.token.claim_name}")
    private String claim_name;


    public static String SECRET;
    public static Integer EXPIRE;
    public static String CLAIM_NAME;
    public static String RESETPWD;
    public static String MINIO_URL;

    @Override
    public void afterPropertiesSet() {
        SECRET = secret;
        EXPIRE = expire;
        CLAIM_NAME = claim_name;
        RESETPWD=resetPwd;
        MINIO_URL=minioUrl;
    }
}
